package com.bytedance.personal

import android.content.Intent
import android.util.Log
import android.view.MotionEvent
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.bytedance.common.base.BaseActivity
import com.bytedance.common.constants.RouterPathConstants
import kotlin.properties.Delegates

@Route(path = RouterPathConstants.PERSONAL_ACTIVITY_PATH)
class PersonalActivity : BaseActivity() {
    @Autowired(name = "name")
    @JvmField
     var name: String? = null

    @Autowired
    @JvmField
     var age: Int = 0

    override fun getLayoutId() = R.layout.activity_personal

    override fun initData() {
        ARouter.getInstance().inject(this)

        setResult(101)
        Log.e("cx","name:$name  age:$age")
    }

    override fun initListener() {
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        if (event?.action == MotionEvent.ACTION_DOWN) {
            open(RouterPathConstants.LOGIN_ACTIVITY_PATH)
        }
        return true
    }

}